import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-wenyao-tabs',
  templateUrl: './wenyao-tabs.component.html',
  styleUrls: ['./wenyao-tabs.component.scss']
})
export class WenyaoTabsComponent implements OnInit {

  _title: { value: string, translate?: string };
  _active = false;

  @Input()
  set title(_title: { value: string, translate?: string } | string) {
    if (typeof _title === 'string') {
      this._title = {
        value: _title,
      }
    } else {
      this._title = _title;
    }
  }

  @Input()
  set active(_active: boolean) {
    this._active = _active;
  }

  get title() {
    return this._title;
  }

  get active() {
    return this._active;
  }

  constructor() { }

  ngOnInit() {
  }

}
